<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
	</head>
	<body>
		<h2 onmouseover="style.color='red'" onmouseout="style.color='black'">我的标题</h2>
		<h3 id="hh">我的JS</h3>
		<button onclick="document.getElementById('hh').style.color='red'">点击</button>
		<p onclick="this.innerHTML='你好！JS'">我的段落</p>
		<h1 onclick="changeText(this)">你好！</h1>
		<div id="dem">
		<p id="demo" class="demo1">Hello! JS</p>
		<p class="cla">classaaaa</p>
		<img id="image" src="img/bd.gif"/>
		</div>
		<script>
//			var x = document.getElemen
//			document.write(x.innerHTML);
//			var y = document.getElementsByClassName("demo1");
//			document.write("class:" + y[0].innerHTML);
//			alert("__"+innerHTML);
//			console.log(y);
//			var z = document.getElementsByClassName("cla");
//			document.write(z[0].innerHTML);
			document.getElementById("image").src="img/landscape.jpg";
			document.getElementById("demo").style.color="red";
			document.getElementById("demo").style.fontFamily="arial";
			document.getElementById("demo").style.fontSize="50px";
			function changeText(ct){
				ct.innerHTML="JavaScript"
			}
			function upper(){
				var x = document.getElementById("fname");
				x.value = x.value.toUpperCase();
			}
			
			function mOver(obj){
				obj.innerHTML="Thank you";
			}
			function mOut(obj){
				obj.innerHTML="Mouse Over Me";
			}
			
			function lighton(){
				document.getElementById("myimage").src="img/eg_bulbon1.gif";
			}
			function lightoff(){
				document.getElementById("myimage").src="img/eg_bulboff.gif";
			}
			function iputback(x){
				x.style.background="red";
			}
			
		

		</script>
		<p>输入小写字母<input type="text" id="fname" onchange="upper()" onfocus="iputback(this)"/></p>
		<div onmouseover="mOver(this)" onmouseout="mOut(this)" style="background-color: red; width: 120px; height: 120px;">	
		</div>
		<br />
		<img id="myimage" onmousedown="lighton()" onmouseup="lightoff()" width="100" height="180" src="img/eg_bulboff.gif"/>
		
	</body>
</html>
